package com.zhiche.lisa.bms.pojo.vo.driver;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "PertrolPriceEffectiveVO", description = "油价变动VO")
public class PertrolPriceEffectiveVO {

    @ApiModelProperty(value = "id", name = "id", dataType = "Integer")
    private Integer id;

    @ApiModelProperty(value = "油价变动名称", name = "name", dataType = "String")
    private String name;

    @NotNull(message = "请选择费用类型")
    @Min(value = 1, message = "费用类型主键不能小于0")
    @ApiModelProperty(value = "燃油类型id", name = "fuelTypeId", dataType = "String")
    private Integer fuelTypeId;

    @ApiModelProperty(value = "燃油类型名称", name = "fuelTypeName", dataType = "String")
    private String fuelTypeName;

    @NotNull(message = "市场价不能为空")
    @DecimalMin(value = "0.01", message = "市场价不能小于0元")
    @ApiModelProperty(value = "市场油价", name = "marketPrice", dataType = "BigDecimal")
    private BigDecimal marketPrice;

    @NotNull(message = "生效时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "生效时间", name = "effectiveDate", dataType = "Date")
    private Date effectiveDate;

    @ApiModelProperty(value = "失效时间", name = "invalidDate", dataType = "Date")
    private Date invalidDate;

    @ApiModelProperty(value = "创建时间", name = "createTime", dataType = "Date")
    private Date createTime;

    @ApiModelProperty(value = "创建人", name = "creator", dataType = "String")
    private String creator;

    @ApiModelProperty(value = "更新时间", name = "updateTime", dataType = "Date")
    private Date updateTime;
}
